﻿@using GoodMan.Infrastructure.Entities.Entity;
@{
    ViewBag.Title = "公告列表";
    Layout = "~/Areas/WorkSpace/Views/Shared/_CollegeAdminTemplete.cshtml";
    ItemListBox<Notice> list = ViewBag.NoticeList;
}


<div id="content-header">
    <h1>
        公告信息</h1>
</div>
<div id="breadcrumb">
    <a href="/workspace/collegeadmin/index" title="Go to Home" class="tip-bottom"><i class="icon-home"></i>首页</a>
    <a href="/workspace/collegeadmin/NoticeList" class="tip-bottom">公告管理</a> <a href="/workspace/collegeadmin/NoticeList"
        class="current">公告列表</a>
</div>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <div class="widget-box">
                <div class="widget-title">
                    <h5>
                        公告列表</h5>
                </div>
                <br />
                <form action="/workspace/collegeadmin/Noticelist" method="get" name="BusinessForm">
                <div style="width: 500px; margin: 0px auto;">
                    <table border="0" cellpadding="0" cellspacing="0">
                        <tr align="center">
                            
                            <td width="100px">
                                查询关键字
                            </td>
                            <td width="20%">
                                <input type="text" placeholder="输入公告标题或者子标题" name="searchKey" value="@ViewBag.Search"  style="width: 200px" class="span4 " />
                            </td>
                            
                            <td>
                                <button type="submit" class="btn btn-primary">
                                    查询</button>
                            </td>
                        </tr>
                    </table>
                </div>
                </form>
                <div class="widget-content nopadding">
                    <table class="table table-bordered data-table">
                        <thead>
                            <tr>
                                <th width="8%">
                                    序号
                                </th>
                                <th width="22%">
                                    标题
                                </th>                                
                                <th width="20%">
                                    子标题
                                </th>
                                
                                <th width="20%">
                                    内容
                                </th>  
                                <th width="10%">
                                    发布人
                                </th>                                
                                <th width="10%">
                                    发布时间
                                </th>
                                   
                                <th width="10%">
                                    操作
                                </th>
                            </tr>
                        </thead>
                        <tbody>
                            @{
                                if (list != null && list.Data != null && list.Data.Count != 0)
                                {
                                    int index = 0;
                                    foreach (var item in list.Data)
                                    {
                                        index++;
                                       
                                <tr class="gradeX">
                                    <td style="width: 10px;">@index</td>                                    
                                    <td>
                                        <a href="/workspace/collegeadmin/NoticeInfo?id=@item.Id&page=@list.CurrentPage" title="查看详细">@item.Title</a>
                                    </td>
                                    <td><span title="@item.SubTitle">@item.SubTitle</span></td>
                                    <td><span title="@item.Content">@item.Content</span></td>
                                   
                                    <td>@item.Promulgator</td>
                                    <td>@item.CreateTime.ToShortDateString()</td>                                  
                                    <td class="center" style="min-width: 200px;">
                                        @{
                                             <a href="/workspace/collegeadmin/NoticeModify?id=@item.Id&page=@list.CurrentPage" class="btn btn-primary btn-mini">
                                                    编辑</a> <a href="/workspace/collegeadmin/Delete?id=@item.Id&page=@list.CurrentPage"  onclick="if (confirm('确认删除数据？删除后该数据无法恢复！')==true){return true;}else{return false;}"  class="btn btn-danger btn-mini">
                                                        删除</a>
                                          
                                        }
                                    </td>
                                </tr>
                                    }

                                }
                                else
                                {
                                <tr>
                                    <td style="width: 10px;" colspan="10" align="center">
                                        <span>没有找到任何数据</span>
                                    </td>
                                </tr>
                                }
                            }
                        </tbody>
                    </table>
                </div>
                @Html.Raw(list.PageItemSegment)
            </div>
        </div>
    </div>
</div>
@section tail{
    <script type="text/javascript">
        $(function () {
            $('#likNotice').addClass('open');
            $('#likNotice').addClass('active');
        });
    </script>
}


